]> dgit.raspbian.org Git - linux-4.9.git/commitdiff
drm: mali-dp: fix Lx_CONTROL register fields clobber
authorMihail Atanassov <mihail.atanassov@arm.com>
Fri, 23 Dec 2016 09:57:20 +0000 (09:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Nov 2017 14:53:13 +0000 (15:53 +0100)
[ Upstream commit c7ffa59cf03c38b91d6ef01e42c1b52fd7a4f285 ]

When updating the rotation fields, one of the assignments zeroes out the
rest of the register fields, which include settings for chroma siting,
inverse gamma, AMBA AXI caching, and alpha blending.

Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/arm/malidp_planes.c

index afe0480d95c9baa62d746837550191e2166295e3..8b009b549e45bf2f741a980ddf2a6b8f517052f2 100644 (file)
@@ -182,7 +182,8 @@ static void malidp_de_plane_update(struct drm_plane *plane,
 
        /* setup the rotation and axis flip bits */
        if (plane->state->rotation & DRM_ROTATE_MASK)
-               val = ilog2(plane->state->rotation & DRM_ROTATE_MASK) << LAYER_ROT_OFFSET;
+               val |= ilog2(plane->state->rotation & DRM_ROTATE_MASK) <<
+                      LAYER_ROT_OFFSET;
        if (plane->state->rotation & DRM_REFLECT_X)
                val |= LAYER_H_FLIP;
        if (plane->state->rotation & DRM_REFLECT_Y)